subroutine fmi_t1en_imnie(fmi, iijka,& 
              t1, icore, fact)
!
use mod_size
use mod_orbit
use mod_iop
use mod_ioff 
implicit none
!
real*8, intent(in) :: fact
real*4, intent(in) :: fmi(*)
real*4, intent(in) :: iijka(*)
!
real*4, intent(inout) :: t1(*), icore(*)
!
integer :: i, j, a, b, nsize, i0, i1, i2
integer, external :: irpdso
real*8, external :: dnrm2
!this is to do fmi = fmi + t1(e,n)*iijka(m,n,i,e)
i0 = 1
i1 = i0 + nvvoo*isd
i2 = i1 + nvvoo*isd
!====AA
!iijka(MNIE)*t1(EN)+iijka(MnIe)*t1(en)
call iexpso(iijka(ioi2(1)), icore(i0), popa, popa, 0, 1, popa, vrta, 1, 0, 1)
call sstgenso(icore(i0), icore(i1), nsize, popa, popa, popa, vrta, & 
               icore, 1, '1342')
call VpqmnVmnrs_to_Vpqrs(icore(i1), t1(ifvo(1)), 1, 1, vrta, popa, 1, &
              popa, popa, 1, zorb, zorb, 1, fmi(ifoo(1)), 1, fact, 1.d0)
!write(6,*)'norm of fmi', dnrm2(irpdso(1, popa, popa, 1), fmi(ifoo(1)), 1)
!
call sstgenso(iijka(ioi2(2)), icore(i1), nsize, & 
              popa, popb, popa, vrtb, icore, 1, '1342')
call VpqmnVmnrs_to_Vpqrs(icore(i1), t1(ifvo(2)), 1, 1, vrtb, popb, 1, &
              popa, popa, 1, zorb, zorb, 1, fmi(ifoo(1)), 1, fact, 1.d0)
!write(6,*)'norm of fmi', dnrm2(irpdso(1, popa, popa, 1), fmi(ifoo(1)), 1)
!====BB
!iijka(mnie)*t1(en)+iijka(mNiE)*t1(EN)
call iexpso(iijka(ioi2(3)), icore(i0), popb, popb, 0, 1, popb, vrtb, 1, 0, 1)
call sstgenso(icore(i0), icore(i1), nsize, popb, popb, popb, vrtb, & 
               icore, 1, '1342')
call VpqmnVmnrs_to_Vpqrs(icore(i1), t1(ifvo(2)), 1, 1, vrtb, popb, 1, &
              popb, popb, 1, zorb, zorb, 1, fmi(ifoo(2)), 1, fact, 1.d0)
!
call sstgenso(iijka(ioi2(4)), icore(i1), nsize, & 
              popb, popa, popb, vrta, icore, 1, '1342')
call VpqmnVmnrs_to_Vpqrs(icore(i1), t1(ifvo(1)), 1, 1, vrta, popa, 1, &
              popb, popb, 1, zorb, zorb, 1, fmi(ifoo(2)), 1, fact, 1.d0)
return
end
